<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head>
    <title>员工管理</title>

    <!--引入公共的easyui文件头-->
    <%@include file="/WEB-INF/views/commons/common_easyui.jsp" %>

    <script type="text/javascript" src="/static/js/system/employee.js"></script>


</head>
<body>

<!--begin信息列表-->
<table id="employee_datagrid"></table>
<!--end信息列表-->

<!--begin左上角工具栏-->
<div id="employee_tb">
    姓名<input class="easyui-textbox" name="queryname" id="queryname">
    <%--根据意向学科名字查询--%>
    职务 <input class="easyui-combobox" name="position" id="position" data-options="
                            url:'/dataDictionaryItem/selectByParentId?id=3',
                            panelHeight:'auto',
                            valueField: 'name', textField: 'name'">
    聘用类型 <input class="easyui-combobox" name="hiretype" id="hiretype"data-options="
                            url:'/dataDictionaryItem/selectByParentId?id=4',
                            panelHeight:'auto',
                            valueField: 'name', textField: 'name'">
    <a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true"
       data-cmd="query">查询</a>
    <br>

    <shiro:hasPermission name="employee:save">
    <a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" data-cmd="add">增加</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="employee:remove">
        <a href="javascript:;" class="easyui-linkbutton" id="remove" data-options="iconCls:'icon-remove',plain:true" data-cmd="remove">离职</a>
    </shiro:hasPermission>
<shiro:hasPermission name="employee:edit">
        <a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true"
       data-cmd="edit">编辑</a>
</shiro:hasPermission>

    <a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="reload">刷新</a>
</div>
<!--end左上角工具栏-->
<!--begin 编辑之后的工具栏-->
<div id="education_tb">
    <a href="javascript:;" class="easyui-linkbutton btn_add" data-options="iconCls:'icon-add',plain:true"
       data-cmd="education_add">增加</a>
    <a href="javascript:;" class="easyui-linkbutton btn-remove" data-options="iconCls:'icon-remove',plain:true"
       data-cmd="education_remove">删除</a>
    <a href="javascript:;" class="easyui-linkbutton btn-save" data-options="iconCls:'icon-edit',plain:true"
       data-cmd="education_reject">撤回</a>
</div>
<!---end编辑之后的工具栏-->
<div id="home_tb">
    <a href="javascript:;" class="easyui-linkbutton " data-options="iconCls:'icon-add',plain:true" data-cmd="home_add">增加</a>
    <a href="javascript:;" class="easyui-linkbutton btn-remove" data-options="iconCls:'icon-remove',plain:true"
       data-cmd="home_remove">删除</a>
    <a href="javascript:;" class="easyui-linkbutton btn-save" data-options="iconCls:'icon-edit',plain:true"
       data-cmd="home_reject">撤回</a>
</div>
<!--begin添加/编辑对话框-->
<!--begin添加/编辑对话框-->
<div id="work_tb">
    <a href="javascript:;" class="easyui-linkbutton " data-options="iconCls:'icon-add',plain:true" data-cmd="work_add">增加</a>
    <a href="javascript:;" class="easyui-linkbutton btn-remove" data-options="iconCls:'icon-remove',plain:true"
       data-cmd="work_remove">删除</a>
    <a href="javascript:;" class="easyui-linkbutton btn-save" data-options="iconCls:'icon-edit',plain:true"
       data-cmd="work_reject">撤回</a>
</div>
<!--begin添加/编辑对话框-->

<div id="employee_dialog" align="center">
    <div id="tt" class="easyui-tabs" style="fit:'true';">
        <div title="基本信息" style="padding:20px;display:none;">
            <form id="employee_form" method="post">
                <table style="margin-top: 20px;">
                    <input type="hidden" name="id" id="employeeId">
                    <tr>
                        <td>工号</td>
                        <td><input class="easyui-textbox" name="jobNumber" id="jobNumber"></td>
                        <td>名称</td>
                        <td><input class="easyui-textbox" name="username"></td>
                    </tr>
                    <tr>
                        <td>部门</td>
                        <td><input class="easyui-combobox" name="department.id" data-options="
                        url:'department/selectAll',
                        panelHeight:'auto',
	                	valueField: 'id', textField: 'name'"></td>
                        <td>职位</td>
                        <td>
                            <input class="easyui-combobox" name="positions" data-options="
                            url:'/dataDictionaryItem/selectByParentId?id=3',
                            panelHeight:'auto',
                            valueField: 'name', textField: 'name'">
                        </td>
                    </tr>
                    <tr>
                        <td>招聘类型</td>
                        <td>
                            <input class="easyui-combobox" name="hireType" data-options="
                            url:'/dataDictionaryItem/selectByParentId?id=4',
                            panelHeight:'auto',
                            valueField: 'name', textField: 'name'">
                        </td>
                        <td>学历</td>
                        <td>
                            <input class="easyui-combobox" name="recoed" data-options="
                            url:'/dataDictionaryItem/selectByParentId?id=2',
                            panelHeight:'auto',
                            valueField: 'name', textField: 'name'">
                        </td>
                    </tr>
                    <tr>
                        <td>岗位</td>
                        <td>
                            <input class="easyui-combobox" name="jobs" data-options="
                            url:'/dataDictionaryItem/selectByParentId?id=5',
                            panelHeight:'auto',
                            valueField: 'name', textField: 'name'">
                        </td>
                        <td>年龄</td>
                        <td><input class="easyui-textbox" name="age"></td>
                    </tr>
                    <tr>
                        <td>性别</td>
                        <td>
                            <select class="easyui-combobox" name="gender" data-options="panelHeight:'auto'" style="width:140px;">
                                <option>男性</option>
                                <option>女性</option>
                            </select>
                        </td>
                        <td>电话</td>
                        <td><input class="easyui-textbox" name="tel"></td>
                    </tr>
                    <tr>
                        <td>邮件</td>
                        <td><input class="easyui-textbox" name="email"></td>
                        <td>生日</td>
                        <td><input class="easyui-datebox" name="birthTime"></td>
                    </tr>
                    <tr>
                        <td>入职时间</td>
                        <td><input class="easyui-datebox" name="inputTime"></td>
                        <td>工龄</td>
                        <td><input class="easyui-textbox" name="serviceLength"></td>
                    </tr>
                    <tr>
                        <td>是否结婚</td>
                        <td>
                            <select class="easyui-combobox" name="marital" data-options="panelHeight:'auto'" style="width:140px;">
                                <option>已婚</option>
                                <option>未婚</option>
                            </select>
                        </td>
                        <td>地址</td>
                        <td><input class="easyui-textbox" name="address"></td>
                    </tr>
                    <tr>
                        <td>角色</td>
                        <td><input class="easyui-combobox" name="role" id="role" data-options="
                        url:'role/listAll',
                        multiple:'true',
                        panelHeight:'auto',
	                	valueField: 'id', textField: 'name'"></td>
                    </tr>
                </table>
            </form>
        </div>
        <div title="工资信息" id="salary_tabs" style="padding:20px;display:none;">
            <form id="salary_form" method="post">
                <table style="fit:true; margin-top: 20px;" id="salaryId">
                    <input type="hidden" name="id" id="salary_id">
                    <input type="hidden" name="employee.id" >
                    <tr>
                        <td>银行卡号</td>
                        <td><input class="easyui-textbox" name="bankcardnumber"></td>
                        <td>基本工资</td>
                        <td><input class="easyui-textbox" name="basesalary"></td>
                    </tr>
                    <tr>
                        <td>公积金</td>
                        <td><input class="easyui-textbox" name="accumulationfund"></td>
                        <td>加班工资</td>
                        <td><input class="easyui-textbox" name="overtime"></td>
                    </tr>
                    <tr>
                        <td>个人收入</td>
                        <td><input class="easyui-textbox" name="personalincome"></td>
                        <td>工作天数</td>
                            <td><input class="easyui-textbox" name="workday"></td>
                    </tr>
                    <tr>
                        <td>迟到天数</td>
                        <td><input class="easyui-textbox" name="lateday"></td>
                        <td>真实工资</td>
                        <td><input class="easyui-textbox" name="realwages"></td>
                    </tr>
                    <tr>
                        <td>奖金</td>
                        <td><input class="easyui-textbox" name="bonus"></td>
                        <td>奖金系数</td>
                        <td><input class="easyui-textbox" name="coefficient"></td>
                    </tr>
                    <tr>
                        <td>社会保险</td>
                        <td><input class="easyui-textbox" name="socialinsurance"></td>
                    </tr>
                </table>
            </form>
        </div>
        <div title="教育情况" style="padding:20px;display:none;">
            <table style="margin-top: 20px;" id="educationId">
            </table>
        </div>
        <div title="家庭情况" style="padding:20px;display:none;">
            <table style="margin-top: 20px;" id="homeId">
            </table>
        </div>
        <div title="工作经历" style="padding:20px;display:none;">
            <table style="margin-top: 20px;" id="workId">
            </table>
        </div>
        <div title="身份证上传" style="padding:20px;display:none;">
            <form enctype="multipart/form-data" method="post" id="pic_form" action="/employee/uploadImage">
                <input name="pic" type="file"/>
                <!--这里要通过js去赋值隐藏域和图片路径-->
                <!--点编辑的时候要为隐藏域当前员工赋值,图片地址赋值-->
                <input type="hidden" name="employeeId" id="imageEmployeeId"/>
                <input type="hidden" name="hiddenImagePath" id="hiddenImagePath"/>
                <img src="" alt="" id="showImage">
            </form>
        </div>
    </div>
</div>
<!--end添加/编辑对话框-->

<!--begin添加/编辑对话框底部按钮-->
<div id="employee_bb">
    <a href="javascript:;" class="easyui-linkbutton" plain="true" iconCls="icon-save" data-cmd="save" id="save">保存</a>
    <a href="javascript:;" class="easyui-linkbutton" plain="true" iconCls="icon-cancel" data-cmd="cancel">取消</a>
</div>
<!--end添加/编辑对话框底部按钮-->

</body>
</html>
